package test;

import dao.StaffsDao;
import dao.impl.StaffsDaoImpl4jdbc;
import entity.Staffs;

import java.util.List;

/**
 * 分页
 * @Author lzp
 * @Date 2024-03-07
 */
public class test06 {
    public static void main(String[] args) {
        StaffsDao staffsDao =new StaffsDaoImpl4jdbc();


        // 设置页码和每页显示数量
        int page = 1;
        int limit = 5;

        List<Staffs> resultList = staffsDao.selectAdPage( page, limit);
        for (Staffs staff : resultList) {
            System.out.println(staff);
        }
//        List<Staffs> resultList = staffsDao.selectAdPage(staffs, 1, 5);
//        for (Staffs staff : resultList) {
//            System.out.println(staff);
//        }
    }
}
